<?php
	header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
	header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
	session_start();
	setcookie("testcookie","this is a test");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>jstests thesis</title>
    </head>
    <body id="body">
		<div id="container">
			<p onclick="alert(this.id);" id="tag1">value1</p>
			<p id="tag2">value2</p>
		</div>
		<div id="content" class="lol">
			<p>content example</p>
		</div>
		<div class="lol">
			<ul id="successlist" style="color:#1D1;">
			</ul>
		</div>
	
		<a href="#" id="linkedit">linktest</a>
		<input type="button" value="test" onclick="testOnclick();return false;"/>
		<input type="button" value="test2" onclick="alert(getText(document.getElementById('successlist').childNodes));return false;"/>
		
			<?php
			foreach(getJsScripts() as $script)
			{
				echo '<script type="text/javascript">';
					echo file_get_contents($script);
				echo '</script>';
			}
		?>
	</body>
</html>

<?php
	function getJsScripts(){
		// "testXmlhttp.js","testGlobal.js","testDocument.js","testWindow.js"
		$arr = array("unitTest.js");
		for($i = 1;$i<8;$i++){
			$arr[] = "oojtests/chapter".$i.".js";
		}
		return $arr;
	}
?>